﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Medianamik.Core;
using System.Collections.Generic;
using Medianamik.Core.Sugar;
using Telerik.Web.UI;

namespace Medianamik.UI.TypeManagement
{
    public partial class InterfaceList : BasePage
    {
        #region Fields


        #endregion

        #region Events

        protected void Page_Load(object sender, EventArgs e)
        {
            
        }

        protected void InterfaceGridItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.Item || 
                e.Item.ItemType == GridItemType.AlternatingItem)
            {
                
            }
        }

        protected void InterfaceGridItemCommand(object sender, CommandEventArgs e)
        {
            switch (e.CommandName)
            {
                case "DeleteInterface":
                    NodeTypeManager.DeleteNodeTypeInterface(new Guid(e.CommandArgument.ToString()));
                    InterfaceGrid.Rebind();
                    break;
                default:
                    break;
            }
        }

        protected void InterfaceGridNeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            InterfaceGrid.DataSource = NodeTypeManager.GetAllNodeTypeInterfaces();
        }

        #endregion

        #region Properties


        #endregion

        #region Methods

        protected void SetRowPropertyStyle(WebControl pControl, Guid pTypeID)
        {

        }

        #endregion
    }
}
